package com.ltv.xiangqiplugin.controllers;

import com.ltv.xiangqiplugin.models.BoardSize;
import com.ltv.xiangqiplugin.models.BoardSizeEnum;
import com.ltv.xiangqiplugin.views.BoardView;
import com.ltv.xiangqiplugin.views.GameActionView;

public class BoardSizeControl {
	private static BoardSizeControl instance;
	private BoardSize boardSize;
	
	private BoardSizeControl() {
		boardSize = new BoardSize();
		boardSize.addObserver(BoardView.defaultBoardView());
		boardSize.addObserver(GameActionView.getInstance());
		boardSize.notifyObservers(BoardSizeEnum.MEDIUM);
	}

	public static BoardSizeControl getInstance() {
		if (instance == null) {
			instance = new BoardSizeControl();
		}
		
		return instance;
	}

	public BoardSize getBoardSize() {
		return boardSize;
	}
	
}
